home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 25
/
CU Amiga Magazine's Super CD-ROM 25 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-08].iso
/
CUCD
/
WWW
/
http
/
www.wirenet.co.uk
/
files
/
Wirenet151.lzx
/
ReadConfig.rexx
next >
Wrap
OS/2 REXX Batch file
|
1987-06-21
|
1KB
|
43 lines
/* ReadConfig by Neil Bothwick */
/* Reads ppp0.config and DialScript to determine various configuration values */
options results
if open(ppp,'ENV:sana2/ppp0.config','R') then do
do until left(cfgline,1) ~= '#'
cfgline = readln(ppp)
end
/* serial.device 0 57600 194.119.174.218 MTU=1500 CD 7WIRE EOFMODE DialScript=AmiTCP:db/DialScript */
parse var cfgline Device Unit Speed .
call close(ppp)
end
if open(ds,'AmiTCP:db/DialScript','R') then do
do until eof(ds)
NextLine = readln(ds)
select
when upper(left(NextLine,10)) = 'SEND "ATDT' then PopNum = substr(NextLine,11)
when pos('assword:',NextLine) > 0 then do
do until upper(left(NextLine,4)) = 'SEND'
NextLine = readln(ds)
end
parse var NextLine a '"' PassWord '"' .
end
otherwise nop
end
end
end
address command
if symbol('Device') = 'VAR' then 'setenv WirenetUpdateDevice' compress(Device,'"')
if symbol('Unit') = 'VAR' then 'setenv WirenetUpdateUnit' compress(Unit,'"')
if symbol('Speed') = 'VAR' then 'setenv WirenetUpdateSpeed' compress(Speed,'"')
if symbol('PopNum') = 'VAR' then 'setenv WirenetUpdatePopNum' compress(PopNum,'"')
if symbol('Password') = 'VAR' then 'setenv WirenetUpdatePassword' compress(Password,'"')